package com.ideal.blockchain.service.deploy;


import com.ideal.blockchain.dao.mapper.FabricHostMapper;
import com.ideal.blockchain.deploy.Host;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HostServiceImpl implements HostService{
    @Autowired
    FabricHostMapper fabricHostMapper;

    public void addHost(Host host){
        fabricHostMapper.addHost(host);
    }

    @Override
    public void delHost(String ip) {
        fabricHostMapper.delHost(ip);
    }

    @Override
    public void alterHost(Host host) {
        fabricHostMapper.alterHost(host);
    }

    @Override
    public List<Host> queryAll() {
        return fabricHostMapper.queryAll();
    }
}
